#ifndef BIT_WIN_FROM_XML_H
#define BIT_WIN_FROM_XML_H


class QDomElement;


namespace BitWin
{


class HeaderRow;
class WordRow;
class FieldRow;
class BitsColumn;
class Model;


// Means to create different BitWin components from XML description
class FromXml
{
public:

    static HeaderRow* makeHeaderRow(const QDomElement& element);
    static WordRow* makeWordRow(
        const QDomElement& element, const int word_no
    );
    static FieldRow* makeFieldRow(
        const QDomElement& element,
        const int word_no
    );
    static BitsColumn* makeBitsColumn(const QDomElement& element);

    // Key method: create the whole model. This method is the one
    // needed by client code.
    static Model* makeModel(const QDomElement& element);
};


} // BitWin namespace end


#endif
